<%@ page language="java" contentType="text/html; charset=UTF-8"%>
<%-- 引入页面头 --%>
<%@ include file="/pageHead.jsp"%>
<form name="form1" id="form1" action="${systemctx}/sample/saveSample.web" method="post">
	<div class="pageMain">
		<div class="pageTitle">
			<%=MessageResourcesUtils.getMessage(request, "systemmanage.bascsetting.title")%>
			<span></span>
			<%=MessageResourcesUtils.getMessage(request, "systemmanage.channle") %>
			<span></span>
			<%=MessageResourcesUtils.getMessage(request, "systemmanage.channle.sale.title") %>
		</div>
		<div class="pageBody">
			<div class="form-group">
				<ul>
					<li>
						<i></i><label>开始时间</label>
						<span><input type="text" value="${startTime}" name="startTime" id="startTime" class="validate[required]"></span>
					</li>
					<li>
						<i></i><label>结束时间</label>
						<span><input type="text" value="${endTime}" name="endTime" id="endTime" class="validate[required]"></span>
					</li>
				</ul>
				<ul>
					<li>
						<i></i>
						<label>
							<%=MessageResourcesUtils.getMessage(request, "systemmanage.channle.sale.column.salesman")%>
						</label>
						<span><input type="text" id="salesman" name="salesman"/></span> 
					</li>
					<li>
						<i></i>
						<label>
							<%=MessageResourcesUtils.getMessage(request,"systemmanage.channle.sale.column.channelCode")%>
						</label>
						<span><input type="text" id="channelCode" name="channelCode"/></span> 
					</li>
				</ul>
				<ul>
					<li>
						<i></i>
						<label>
							<%=MessageResourcesUtils.getMessage(request,"systemmanage.channle.sale.column.paymentType")%>
						</label>
						<span><select id="paymentType" name="paymentType" class="validate[required]"></select></span> 
					</li>
					<li>
						<i></i>
						<label>
							<%=MessageResourcesUtils.getMessage(request,"systemmanage.channle.sale.column.currencyType")%>
						</label>
						<span><select id="currencyType" name="currencyType" class="validate[required]"></select></span> 
					</li>
				</ul>
			</div>	
		</div>
		<div class="button-group">
			<input type="button" class="btn btn-default" id="butQuery" name="butQuery" value="<%=MessageResourcesUtils.getMessage(request, "common.button.query") %>" />
		</div>
		<table>
			<tbody>
				<tr>
					<td>
						<table id="datagrid"></table>
					</td>
				</tr>
			</tbody>
		</table>
	</div>
</form>
<script type="text/javascript">
	$(document).ready(function(){	
		$("#startTime").date_input();
		$("#endTime").date_input();
		$("#paymentType").selectutil({
			optModel :<%=SysConstant.PaymentType.getModelJSONString(true,false )%>,
			optDefault :''
		});
		$("#currencyType").selectutil({
			optModel :<%=SysConstant.CurrencyType.getModelJSONString(true,false )%>,
			optDefault :''
		});
		$('#datagrid').issdatagrid({
			formid : 'form1',
			title : '<%=MessageResourcesUtils.getMessage(request,"systemmanage.channle.sale.title")%>',
			width : 'auto',
			nowrap : true,
			autoRowHeight : false,
			singleSelect : true,
			striped : true,
			url : '${systemctx}/systemmanage/order/queryChannelOrderListInfoDataGrid.json',
			sortName: 'modify_time',
			sortOrder: 'desc',
			remoteSort : true,
			idField : 'ordercode',
			pagination : true,
			rownumbers : true,
			showFooter : true,
			queryParams:$('#form1').serializeObject(),
			columns : [[ 
				{field : 'channelid',hidden : true},
			  	{title : '<%=MessageResourcesUtils.getMessage(request,"systemmanage.channle.sale.column.salesman")%>',field : 'salesman',sortable : true,align : 'left',width:120},
	            {title : '<%=MessageResourcesUtils.getMessage(request,"systemmanage.channle.sale.column.channelName")%>',field : 'channelname',sortable : true,align : 'left',width:80},
	            {title : '<%=MessageResourcesUtils.getMessage(request,"systemmanage.channle.sale.column.channelCode")%>',field : 'channelcode',sortable : true,align : 'left',width:80},
	            {title : '<%=MessageResourcesUtils.getMessage(request,"systemmanage.channle.sale.column.userId")%>',field : 'userid',sortable : true,align : 'left',width:200},
	            {title : '<%=MessageResourcesUtils.getMessage(request,"systemmanage.channle.sale.column.orderCode")%>',field : 'ordercode',sortable : true,width : 165,align : 'left'},
	            {title : '<%=MessageResourcesUtils.getMessage(request,"systemmanage.channle.sale.column.paymentType")%>',field : 'paymenttype',sortable : true,width : 70,align : 'left'},
	            {title : '<%=MessageResourcesUtils.getMessage(request,"systemmanage.channle.sale.column.currencyType")%>',field : 'currencytype',sortable : true,width : 70,align : 'left'},
	            {title : '<%=MessageResourcesUtils.getMessage(request,"systemmanage.channle.sale.column.orderMoney")%>',field : 'ordermoney',sortable : true,width : 90,align : 'right'},
	            {title : '<%=MessageResourcesUtils.getMessage(request,"systemmanage.channle.sale.column.payMoney")%>',field : 'paymoney',sortable : true,width : 90,align : 'right'},
	            {title : '<%=MessageResourcesUtils.getMessage(request,"systemmanage.channle.sale.column.modifyTime")%>',field : 'modifytime',sortable : true,width : 150,align : 'left'}
	        ]],
			onLoadSuccess : function(data) {

			}
		});		
		$('#butQuery').click(function() {
			$('#datagrid').datagrid('load',$('#form1').serializeObject());
		});	
		

	});
</script>
<%-- 引入页面尾 --%>
<%@ include file="/pageFloor.jsp"%>